import {getList} from '@/api/table'

const state = {
  bookList: []

}

const mutations = {
  FIND_ALLBOOK(state, bookList) {
    state.bookList = bookList
  },

}

const actions = {
  async findAllBook({commit}) {
    let result = await getList()
    if (result.code == 20000) {
      commit('FIND_ALLBOOK', result.data.items)
    }
  }

}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
